#pragma once

#include "article.h"
#include "bucket.h"
#include "radix.h"

#include <iostream>
#include <fstream>
using namespace std;

template <int n, int b>
class HashDat
{
public:
    HashDat();
    HashDat(const char* fileName);

    void insert(Article *artikel);
    Article retrieve(int number);
    void display();

private:
    const char * m_fileName;
    fstream * m_hashFile;
    Bucket<n> * m_bucket;
    Radix * m_radix;

    void openHashFile();
    void buildRadix();
    long bucketCount();
};
